package cn.com.pxto.web.tag;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;

@SuppressWarnings("serial")
public class ImportantTypeTag extends BodyTagSupport {
	private Integer importantType;

	public ImportantTypeTag() {

	}

	public int doStartTag() throws JspException {
//		String value = importantType.toString();
		StringBuffer value = new StringBuffer();
		for(int i =0 ;i<importantType;i++){
			value.append("<img src='styles/image/star.JPG'>");
		}
		try {
			pageContext.getOut().print(value);
		} catch (IOException e) {
			e.printStackTrace();
		}

		return super.doStartTag();
	}

	public void setImportantType(Integer importantType) {
		this.importantType = importantType;
	}
}
